package cn.hx.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class PublicController {

    @GetMapping("{pageName}")
    public String page(@PathVariable String pageName) {
        return pageName;
    }
    @GetMapping("system/{pageName}")
    public String systemPage(@PathVariable String pageName) {
        return "system/"+pageName;
    }
    @GetMapping("user/{pageName}")
    public String user(@PathVariable String pageName) {
        return "user/"+pageName;
    }

    @GetMapping("system/{pathName1}/{pathname2}")
    public String news(@PathVariable String pathName1,@PathVariable String pathname2) {
        return "system/"+pathName1+"/"+pathname2;
    }


}
